Skip to content

Conversation

@nweb
Copy link
Contributor

@nweb nweb commented Feb 12, 2025

No description provided.

@botder
Copy link
Member

botder commented Feb 12, 2025

And what's the point of changing 16 year old code that has worked fine so far, and everyone expects it to be wrong there?
https://int64.org/docs/gamestat-protocols/ase.html

@Fernando-A-Rocha
Copy link
Contributor

ASE protocol shouldn't be changed. It is what it is. If we want to modernize, then we can simply create a new standard using some modern structure like JSON for sharing server information with a masterlist.

@botder
Copy link
Member

botder commented Feb 12, 2025

ASE protocol shouldn't be changed. It is what it is. If we want to modernize, then we can simply create a new standard using some modern structure like JSON for sharing server information with a masterlist.

The point of this pull request is for MTA to actually follow the ASE protocol, not to break it. But it's simply too late to change it.

@TheNormalnij
Copy link
Member

The point of this pull request is for MTA to actually follow the ASE protocol, not to break it. But it's simply too late to change it.

It's funny enough, but this PR doesn't break backward compability.

0x16 - 0001 0110 // team, skin, ping
0x10 - 0001 0000 // ping

0x32 - 0011 0010 // team, ping, time
0x20 - 0010 0000 // time

The compiler optimizes both variants to mov <dest>, 63

@botder botder merged commit 8da54f7 into multitheftauto:master Feb 12, 2025
6 checks passed
@botder botder added this to the 1.6.1 milestone Feb 12, 2025
MTABot pushed a commit that referenced this pull request Feb 12, 2025
8da54f7 Minor refactor for ASE player flags (PR #4018)
421f1e0 Visual Studio Update
@tederis
Copy link
Member

tederis commented Feb 13, 2025

The compiler optimizes both variants to mov , 63

I don't think that we should rely on it. When deal with optimizing compilers we cannot predict the exact output. It can vary over time and platforms. And especially depends on compiler flags.

@Lpsd
Copy link
Member

Lpsd commented Feb 13, 2025

whilst I thought it was interesting, I didn't expect this to get merged. I agree with @tederis

@botder
Copy link
Member

botder commented Feb 13, 2025

If you didn't notice, 0x32 | 0x16 in the old code, sets the 0x10 and 0x20 bits in every case, plus some lower bits, which we can safely ignore, because we set all bits there anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants